from human import Player
from equipment import Equipment
from item import Item
from pocket import Storage,Bag,Garage
#from pocket import Bag
#from pocket import Garage
import unittest
class TestBag(unittest.TestCase):
    def setUp(self):
        self.ppl=Player(mhp=20,hp=19)
        self.newstorage=Storage()
        self.newbag=Bag()
        self.newgar=Garage()
        self.drug=Item(hp=10)
        self.weapon=Equipment(atk=2)
    def test_Bag(self):
        print 'add a bag'
        self.ppl.mybag = self.newbag
        print 'finish adding'
        self.ppl.mybag.addItem(self.drug)
#        self.assertEqual(self.mybag.addItem(self.ppl),False)
#        self.assertEqual(self.mybag.drop(self.ppl),False)
#        self.assertEqual(self.mybag.addItem(self.drug),True)
#        self.assertEqual(self.mybag.addItem(self.drug),True)
#        self.assertEqual(self.mybag.addItem(self.drug),True)
#        self.assertEqual(self.mybag.addItem(self.drug),True)
#        self.assertEqual(self.mybag.addItem(self.drug),True)
#        self.assertEqual(self.mybag.addItem(self.drug),True)
#        self.assertEqual(self.mybag.addItem(self.drug),True)
#        self.assertEqual(self.mybag.addItem(self.weapon),True)
#        self.assertEqual(self.mybag.addItem(self.weapon),True)
#        self.assertEqual(self.mybag.addItem(self.weapon),True)
#        self.assertEqual(self.mybag.addItem(self.weapon),False)
#        self.assertEqual(self.mybag.addItem(self.weapon),False)
#        print 'start testing Storage System'
#        self.assertEqual(self.newstorage.addItem(self.weapon),True)
#        print 'start testing Garage System'
#        self.assertEqual(self.newgar.addItem(self.weapon),True)
#        for i in xrange(100):
#            self.newgar.addItem(self.weapon)
#            print i
#        self.assertEqual(self.newgar.addItem(self.weapon),False)
#        print 'length:'
#        print len(self.newgar.bags)
#        self.assertEqual(self.newgar.addItem(self.weapon),False)
if __name__ == '__main__':
    unittest.main()
